{% extends "mweb/base.html" %}

{% block title %}YYZB{% endblock %}

{% block content %}

<div class="page__hd">
    <h1 class="page__title"> HiBao </h1>
    <p class="page__desc"> 欢迎您使用YYZBAPP </p>
</div>

<div class="page__bd">
    <div class="weui-btn-area">
        {% if type == 'wx' %}
            <a class="weui-btn weui-btn_block weui-btn_primary" href="javascript:h5_pay(30)">  ￥30 购买 <b>30钻石</b> </a>
            <a class="weui-btn weui-btn_block weui-btn_primary" href="javascript:h5_pay(98)">  ￥98 购买 <b>98钻石</b> <b><span class="light_yellow_color">(送5钻)</span></b> </a>
            <a class="weui-btn weui-btn_block weui-btn_primary" href="javascript:h5_pay(298)"> ￥298 购买 <b>298钻石</b> <b><span class="light_yellow_color">(送18钻)</span></b> </a>
            <a class="weui-btn weui-btn_block weui-btn_primary" href="javascript:h5_pay(588)"> ￥588 购买 <b>588钻石</b> <b><span class="light_yellow_color">(送38钻)</span></b> </a>
            <a class="weui-btn weui-btn_block weui-btn_primary" href="javascript:h5_pay(1388)"> ￥1388 购买 <b>1388钻石</b> <b><span class="light_yellow_color">(送98钻)</span></b> </a>
        {% else %}
            <a class="weui-btn weui-btn_block weui-btn_primary" href="{% url 'mweb:pay_with_alipay' uid 30 %}">  ￥30 购买 <b>30钻石</b> </a>
            <a class="weui-btn weui-btn_block weui-btn_primary" href="{% url 'mweb:pay_with_alipay' uid 98 %}">  ￥98 购买 <b>98钻石</b> <b><span class="light_yellow_color">(送5钻)</span></b> </a>
            <a class="weui-btn weui-btn_block weui-btn_primary" href="{% url 'mweb:pay_with_alipay' uid 298 %}"> ￥298 购买 <b>298钻石</b> <b><span class="light_yellow_color">(送18钻)</span></b> </a>
            <a class="weui-btn weui-btn_block weui-btn_primary" href="{% url 'mweb:pay_with_alipay' uid 588 %}"> ￥588 购买 <b>588钻石</b> <b><span class="light_yellow_color">(送38钻)</span></b> </a>
            <a class="weui-btn weui-btn_block weui-btn_primary" href="{% url 'mweb:pay_with_alipay' uid 1388 %}"> ￥1388 购买 <b>1388钻石</b> <b><span class="light_yellow_color">(送98钻)</span></b> </a>
        {% endif %}
    </div>
</div>

<div class="page__ft">
    <div>
        <span class="bottom-logo">
           <i class="fa fa-bold" style="font-size:25px"></i> HiBao
       </span>
    </div>
</div>

{% endblock content %}


<!-- SCRIPT
  =====================================================================-->

{% block extra_js %}
<script>

function h5_pay(rmb) {
    let url = "{% url 'mweb:api_pay' %}";
    let data = {
        'uid': {{ uid }},
        'rmb': rmb,
        'wap_name': 'haibao',
    };

    new my_ajax(url, data, '', '', (data, message) => {
        window.location = data['mweb_url'];
    });
}

</script>
{% endblock extra_js %}
